class RectMaker {
  constructor(callback,areaId){
      this.callback = callback
      this.areaId= areaId;
  }
  makeADom(text,point,BMap){
    var div =document.createElement("div");
    div.style.position = "absolute";
    div.style.zIndex = BMap.Overlay.getZIndex(point.lat);
    div.style.backgroundColor = "#00ae66";
    div.style.border = "1px solid write";
    div.style.color = "white";
    div.style.height = "18px";
    div.style.height = "18px";
    div.style.width = "92px";

    div.style.padding = "5px";
    div.style.lineHeight = "18px";
    div.style.textAlign="center";
    div.style.whiteSpace = "nowrap";
    div.style.MozUserSelect = "none";
    div.style.fontSize = "4vw"
    div.appendChild(document.createTextNode(text));
    var that =this;
    div.addEventListener("click",()=>{
      that.callback(that.areaId);
    })
    return div;
  }

}
export default RectMaker
